var a = getApp();

Page({
    data: {},
    onLoad: function(t) {
        wx.showLoading({
            title: "加载中...",
            mask: !0
        });
        var e = this, s = [], o = [], r = [], d = [], n = [], p = [], i = wx.getStorageSync("id") || "";
        wx.request({
            url: a.globalData.dicc + "disease/detail/" + i,
            data: {},
            header: {
                "content-type": "application/json"
            },
            success: function(a) {
                for (var t = JSON.parse(a.data.data.causeDiseaseFormat), i = 0; i < t.length; i++) s.push(t[i]);
                for (var m = JSON.parse(a.data.data.symptomDescFormat), i = 0; i < m.length; i++) o.push(m[i]);
                for (var c = JSON.parse(a.data.data.treatmentFormat), i = 0; i < c.length; i++) r.push(c[i]);
                for (var h = JSON.parse(a.data.data.preventionFormat), i = 0; i < h.length; i++) d.push(h[i]);
                for (var g = JSON.parse(a.data.data.diagnosisFormat), i = 0; i < g.length; i++) n.push(g[i]);
                for (var l = JSON.parse(a.data.data.complicationFormat), i = 0; i < l.length; i++) p.push(l[i]);
                e.setData({
                    text: a.data.data.diseaseName,
                    text1: a.data.data.deptType,
                    text2: a.data.data.deptName,
                    causeDiseaseFormat1: s,
                    symptomDescFormat1: o,
                    treatmentFormat1: r,
                    symptom: a.data.data.symptom,
                    preventionFormat1: d,
                    diagnosisFormat1: n,
                    complicationFormat1: p
                }), wx.hideLoading();
            }
        });
    }
});